package com.ruoyi.common.exception;

/**
 * @Author: SongYF
 * @Date: 2021/11/10-11-10-8:48
 * @Description: 小程序token异常处理
 * @Version: 1.0
 */
public class TokenException extends RuntimeException {
    private Integer code;

    private final String message;

    public TokenException(String message) {
        this.message = message;
    }

    public TokenException(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public TokenException(String message, Throwable e) {
        super(message, e);
        this.message = message;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public Integer getCode() {
        return code;
    }
}
